package com.example.api.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 用户创建DTO
 * 用于简化创建用户时需要的参数
 * 
 * @author example
 * @since 1.0.0
 */
@Data
@Schema(description = "用户创建请求参数")
public class UserCreateDTO {

    @Schema(description = "租户ID", example = "1", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "租户ID不能为空")
    private Long tenantId;

    @Schema(description = "用户名，用于登录和显示，必须唯一", example = "admin", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "用户名不能为空")
    @Size(min = 3, max = 100, message = "用户名长度必须在3-100个字符之间")
    private String username;

    @Schema(description = "昵称", requiredMode = Schema.RequiredMode.REQUIRED)
    @Size(max = 100, message = "昵称长度不能超过100个字符")
    private String nickname;
    
    @Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "密码不能为空")
    @Size(min = 6, max = 100, message = "密码长度必须在6-100个字符之间")
    private String password;
    
    @Schema(description = "用户邮箱，必须唯一", example = "admin@example.com", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Email(message = "邮箱格式不正确")
    private String email;
    
    @Schema(description = "电话")
    private String phone;
    
    @Schema(description = "姓名")
    private String name;
} 